package com.itheima.io;

import java.io.*;

public class IODemo07 {
    public static void main(String[] args) throws IOException {
        //在底层创建了一个默认长度为8192的字节数组
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("E:\\ooo.avi"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("day11_IO\\1copy.avi"));

        int b ;
        while ((b = bis.read())!=-1){
            bos.write(b);
        }

        //方法的底层会把字节流关闭
        bis.close();
        bos.close();
    }
}
